/******************************************************************
 *
 *    tenant, Powered By uyun.cn.
 *
 *    Copyright (c) 2001-2020
 *    https://uyun.cn
 *
 *    Package:     wzg.com.pipe
 *
 *    Filename:    RunTest
 *
 *    Description: (用一句话描述该文件做什么)
 *
 *    Copyright:   Copyright (c) 2001-2020
 *
 *    Company:     uyun.cn
 *
 *    @author: 王志刚
 *
 *    @version: 1.0.0
 *
 *    Create at:   2018-01-05 下午5:26
 *
 *    Revision:
 *
 *    2018-01-05 下午5:26
 *        - first revision
 *
 *****************************************************************/
package wzg.com.pipe.string;

import java.io.*;

/**
 * RunTest(这里用一句话描述这个类的作用)
 *
 * @author wangzg
 * @version 1.0.0
 * @create 2018-01-05 下午5:26
 */
public class RunTest {

    public static void main(String[] args) throws IOException, InterruptedException {
        WriteData w = new WriteData();
        ReadData r = new ReadData();

        PipedReader in = new PipedReader();
        PipedWriter ou = new PipedWriter();

        ou.connect(in);

        RThread rt = new RThread(r, in);
        rt.start();
//        rt.join();

        Thread.sleep(2000);

        WThread wt = new WThread(w, ou);
        wt.start();
    }
}
